<?php
 
class Plugins_SelectLayout extends Zend_Controller_Plugin_Abstract
{
    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
		$module = $request->getModuleName();
		$layout = Zend_Layout::startMvc();		
		$layoutPath = APPLICATION_PATH . "/templates/" . $module;
 
        $layout->setLayoutPath($layoutPath);
        $layout->setLayout('layout');
    }
}